<!DOCTYPE html>
<html>

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0" />
    <meta name="format-detection" content="telephone=no,email=no,date=no,address=no">
    <title>首页</title>
    <link rel="stylesheet" href="../../css/style.css" />
    <link rel="stylesheet" href="../../css/aui-slide.css">
    <link rel="stylesheet" href="../../css/iconfont/iconfont.css">
    <link rel="stylesheet" href="../../css/index/index.css">
    <link rel="stylesheet" href="../../css/aui.css">
    <link rel="stylesheet" href="../../script/swiper/swiper.min.css">
    <link rel="stylesheet" href="../../script/widget/Zepto/dropload.css">
    <style>
        .aui-grid [class*=aui-col-] {
            padding: 0.2rem 0 !important;
        }
        .aui-bar-nav {
            position: fixed !important;
            top: 0;
            left: 0;
            background: rgba(0, 0, 0, 0);
        }
        .aui-col-xs-6{
            height: 4.5rem;
        }
        .aui-col-xs-6 div{
            width:90%;
            display: block;
            text-align: center;
            margin: 0 auto;
            height: 3.5rem;
            line-height: 3.5rem;
            box-shadow: 0rem 0.25rem 0.25rem #B2DDEA;
            border-radius: 0.3rem;
        }
        .aui-col-xs-6 div>div:nth-child(1){
            float: left;
            width: 60%;
            box-shadow:none;
        }
        .aui-col-xs-6 div>div:nth-child(1) img{
            height: 3.5rem;
        }
        .aui-col-xs-6 div div:nth-child(2){
            float: right;
            width: 40%;
            box-shadow:none;
        }
        .aui-col-xs-6 div div:nth-child(2) img{
            height: 3.5rem;
        }
        .index_bg{
            background: #ffffff;
            box-shadow:none;
            color: black;
        }
        .index_bg_hover{
            background: #50caf3;
            box-shadow:none;
            color:#ffffff !important;
        }
    </style>
</head>

<body>
    <header class="aui-bar aui-bar-nav" id="header">
        <a class="aui-pull-left aui-btn" onclick="map();">
            <i class="iconfont icon-dangqianweizhi" style="font-size:1.1rem;"></i><span id="city" style="font-size:0.8rem;">定位中</span>
        </a>
        <div class="aui-title" style="color:#FFFFFF;">
        </div>
        <a class="aui-pull-right aui-btn" onclick="message();">
            <div class="aui-dot" style="margin-top:5px;"></div>
            <span class="iconfont icon-xiaoxitixing" style="font-size:1.1rem;"></span>
        </a>
    </header>

    <div class="content">
        <div id="aui-slide2">
            <div class="aui-slide-wrap" id="aui-slide-wrap">
                <img src="../../image/flash/flash_default.png" width="100%" height="200" />
            </div>
            <div class="aui-slide-page-wrap"></div>
        </div>
        <!--公告栏-->
        <div class="announcement" onclick="notice_list();" style="position:relative;display:flex;margin:0.5rem 0;padding:0 0.75rem;background-color:white;width:100%;height:2.5rem;line-height:2.5rem;">
            <img src="../../image/notice.png" alt="" style="display:block;margin:0.5rem 0;">
            <div class="swiper-container" style="float:left;font-weight:normal;">
                <div class="swiper-wrapper">
                </div>
            </div>
            <div class="infor" style="width:3rem;float:right;font-size:0.7rem;color:#49B5D9;line-height:1rem;text-align:center;padding:0.25rem 0;">
                <img src="../../image/details.png" alt="" style="display:block;margin:0.5rem 0;">
            </div>
        </div>
        <!--功能九宫格-->
        <div class="aui-grid" >
            <div class="aui-row">
                <!--机票-->
                <div class="aui-col-xs-6">
                    <div class="index_bg" onclick="aircraft(this)">
                        <div><img src="../../image/index/icon_07.png"></div>
                        <div>机票</div>
                    </div>
                </div>
                <!--酒店-->
                <div class="aui-col-xs-6">
                    <div class="index_bg" onclick="hotel(this)">
                        <div><img src="../../image/index/icon_09.png"></div>
                        <div>酒店</div>
                    </div>
                </div>
                <!--车票-->
                <div class="aui-col-xs-6">
                    <div class="index_bg" onclick="train(this)">
                        <div><img src="../../image/index/icon_17.png"></div>
                        <div>火车票</div>
                    </div>
                </div>
                <!--申请单-->
                <div class="aui-col-xs-6 apply_order" style="display:none;">
                    <div class="index_bg " onclick="evection(this)">
                        <div><img src="../../image/index/icon_19.png"></div>
                        <div>申请单</div>
                    </div>
                </div>
                <!--报销单-->
                <div class="aui-col-xs-6 expense_order" style="display:none;">
                    <div class="index_bg " onclick="expenses(this)">
                        <div><img src="../../image/index/icon_27.png"></div>
                        <div>报销单</div>
                    </div>
                </div>
                <!--补助单-->
                <div class="aui-col-xs-6 allowance_order" style="display:none;">
                    <div class="index_bg "  onclick="allowance(this)">
                        <div><img src="../../image/index/icon_29.png"></div>
                        <div>补助单</div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</body>

</html>
<script src="../../script/extend/jquery-3.3.1.min.js"></script>
<script src="../../script/aui/api.js"></script>
<script src="../../script/aui/aui-slide.js"></script>
<script src="../../script/aui/aui-tab.js"></script>
<script src="../../script/swiper/swiper.min.js"></script>
<script src="../../script/common.js"></script>
<script src="../../script/config.js"></script>
<script src="../../script/extend/doT.min.js"></script>
<script src="../../service/index/index.js"></script>
<script id="wap_slides" type="text/x-dot-template" charset="utf-8">
    {{ for(var prop in it){ }}
    <div class="aui-slide-node bg-dark">
        <img src="../../image/flash/flash_default.png" data-url="{{=it[prop]['image']}}?x-oss-process=image/format,jpg/interlace,1" onload="LoadImage(this)" />
    </div>
    {{ } }}
</script>
<script>
    apiready = function() {
        api.parseTapmode();
        new index();
    };

    //机票
    function aircraft(obj) {
        $(obj).removeClass('index_bg').addClass('index_bg_hover');
        setTimeout(function() {
            $(obj).removeClass('index_bg_hover').addClass('index_bg');
        }, 1000);
        api.openWin({
            name: 'search_win',
            url: './aircraft/search_win.html'
        });
    }

    //火车票
    function train(obj) {
        $(obj).removeClass('index_bg').addClass('index_bg_hover');
        setTimeout(function() {
            $(obj).removeClass('index_bg_hover').addClass('index_bg');
        }, 1000);
        api.openWin({
            name: 'page1',
            url: './train/train_demand_win.html'
        });
    }

    //酒店
    function hotel(obj) {
        $(obj).removeClass('index_bg').addClass('index_bg_hover');
        setTimeout(function() {
            $(obj).removeClass('index_bg_hover').addClass('index_bg');
        }, 1000);
        api.openWin({
            name: 'hotel_search_win',
            url: './hotel/search_win.html'
        });
    }

    //出差申请
    function evection(obj) {
        $(obj).removeClass('index_bg').addClass('index_bg_hover');
        setTimeout(function() {
            $(obj).removeClass('index_bg_hover').addClass('index_bg');
        }, 1000);
        $api.rmStorage('travel_site');
        $api.rmStorage('travel_destination');
        api.openWin({
            name: 'travel_apply_add',
            url: './apply/travel_apply_add_win.html'
        });
    }

    //差旅报销
    function expenses(obj) {
        $(obj).removeClass('index_bg').addClass('index_bg_hover');
        setTimeout(function() {
            $(obj).removeClass('index_bg_hover').addClass('index_bg');
        }, 1000);
        $api.rmStorage('orderids');
        api.openWin({
            name: 'travel_expense_add',
            url: './expense/travel_expense_add_win.html'
        });
    }
    //差旅补助
    function allowance(obj) {
        $(obj).removeClass('index_bg').addClass('index_bg_hover');
        setTimeout(function() {
            $(obj).removeClass('index_bg_hover').addClass('index_bg');
        }, 1000);
        $api.rmStorage('allowance_orderids');
        api.openWin({
            name: 'travel_allowance_add',
            url: './allowance/travel_allowance_add_win.html'
        });
    }

    //公告列表
    function notice_list() {
        api.openWin({
            name: 'notice_list',
            url: './notice/notice_list_win.html'
        });
    }

    //打开地图
    function map() {
        api.openWin({
            name: 'map',
            url: './map/demo_mark_win.html'
        });
    }

    //打开消息
    function message() {
        openWin('message', './message/message_win.html');
    }
</script>
